/*
 * =====================================================================================
 *
 *       Filename:  report_tcp.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2016年03月14日 11时15分20秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  jianxi sun (jianxi), ycsunjane@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef __REPORT_TCP_H__
#define __REPORT_TCP_H__
#include <stdint.h>
#define CURLBUFLEN 	(2048)

struct tcphead_t {
	char pktlen[4];
	char func[2];
	char seqnum[4];
	char data[0];
} __attribute__((packed));

struct heartbeat_t {
	char devmac[18];
} __attribute__((packed));

struct timesync_t {
	char curr[14];
} __attribute__((packed));

struct aprep_t {
	char devmac[18];
	char repnum[2];
	char apmac[18];
	char ssid[64];
	char channel[2];
	char encrypt[10];
	char signal[4];
} __attribute__((packed));

struct clirep_t {
	char devmac[18];
	char repnum[2];
	char climac[17];
	char ssid[64];
	char bssid[17];
	char time[10];
	char signal[4];
	char virtuallen[3];
	char virtualinfo[0];
} __attribute__((packed));

struct resp_t {
	char status[1];
} __attribute__((packed));

#define WIFI_HEARTBEAT "05"
#define WIFI_AP_DATA "08"
#define WIFI_CLI_DATA "09"
#endif /* __REPORT_TCP_H__ */
